package com.yunhe.history.client;

import com.yunhe.history.client.fallback.AuthorityFallbackFactory;
import com.yunhe.common.model.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @author liuronglei
 */
@ApiIgnore
@FeignClient(value = "yh-authority", fallbackFactory = AuthorityFallbackFactory.class)
@Component
public interface AuthorityClient {
    /**
     * 根据电站ID或电站代码获得时区ID
     */
    @RequestMapping(value = "/stations/timeZoneId", method = RequestMethod.GET)
    ResponseEntity<ResultObject<String>> getTimeZoneId(@RequestParam("code") Long stationCode);
}
